const str = 'hello world'
console.log(str.split('').reverse().join(''))

function reverseStr(str){
    const arr1 = str.split('')
    const result = []
    const arr = [...arr1]
    arr1.map(item=>{
        result.push(arr.pop())
    })
    return result.join('')

}
console.log(reverseStr(str),'reverseStr(str)')